﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using _024_第二十四章_职责链模式.NewFolder1;

namespace _024_第二十四章_职责链模式
{
    class Program
    {
        static void Main(string[] args)
        {
            Little xiao = new Little();
            Middle zhong = new Middle();
            Large da = new Large();
            xiao.SetSuccessor(zhong);
            zhong.SetSuccessor(da);

            int[] requests = new int[3] { 9, 19, 29 };
            foreach (var item in requests)
            {
                xiao.HandleRequest(item);
            }


            Console.ReadKey();
        }
    }
}
